#@cmsLayout()

#define cmsContent()
<div class="cms-breadcrumb">
	<i class="layui-icon layui-icon-flag"></i>
	<span class="layui-breadcrumb">
	  	<a href="">访问日志</a>
	  	<a><cite>游客访问日志</cite></a>
	</span>
</div>

<div class="body-card layui-card">
	<div class="">
		<form class="layui-form" action="#(ctx)/cmsLog/enterCdsLogView" method="post" onsubmit="return false;">
  			<input type="hidden" name="type" value="cds">
  			<div class="layui-inline">
	    		<label class="layui-form-label">开始时间</label>
	   			<div class="layui-input-inline">
	      			<input type="text" id="startDate" name="startDate" placeholder="开始时间" class="layui-input" value="#(startDate)">
	    		</div>
  			</div>
  			<div class="layui-inline">
	    		<label class="layui-form-label">截止时间</label>
	   			<div class="layui-input-inline">
	      			<input type="text" id="endDate" name="endDate" placeholder="截止时间" class="layui-input" value="#(endDate)">
	    		</div>
  			</div>
  			<div class="layui-inline">
	    		<label class="layui-form-label">浏览者IP</label>
	   			<div class="layui-input-inline">
	      			<input type="text" name="ip" placeholder="请输入访问者IP地址" class="layui-input" value="#(ip)">
	    		</div>
  			</div>
  			<div class="layui-inline">
		    	<div class="layui-input-inline">
		      		<button class="layui-btn" onclick="ajaxSearchForm('.layui-form','#rightMain')">查询</button>
		    	</div>
		  	</div>
  		</form>
	</div>
	<table class="layui-table">
	  	<colgroup>
	    	<col width="80">
	    	<col width="100">
	    	<col width="150">
	    	<col>
	    	<col width="250">
	  	</colgroup>
	 	<thead>
	    	<tr>
	      		<th>序号</th>
	      		<th>IP</th>
	      		<th>请求地址</th>
	      		<th>请求参数</th>
	      		<th>访问时间</th>
	    	</tr> 
	  	</thead>
	  	<tbody>
	  		#for(x : logPage.getList())
	    	<tr>
	      		<td>#(for.count)</td>
	      		<td>#(x.ip)</td>
	      		<td>#(x.actionKey)</td>
	      		<td>#(x.parameter)</td>
	      		<td>#date(x.accessTime,"yyyy-MM-dd HH:mm:ss")</td>
	    	</tr>
	    	#end
	  	</tbody>
	</table>
	###分页
	#set(append='')
	#if(type)
		#set(append=append+'&type='+type)
	#end
	#if(ip)
		#set(append=append+'&ip='+ip)
	#end
	#if(startDate)
		#set(append=append+'&startDate='+startDate)
	#end
	#if(endDate)
		#set(append=append+'&endDate='+endDate)
	#end
	#@paginate?(logPage.totalRow, logPage.pageNumber, logPage.totalPage, '/cmsLog/enterCdsLogView?page=')
</div>

#@jsInit()
<script>
	var laydate = layui.laydate;
	laydate.render({
	    elem: '#startDate' //指定元素
	});
	laydate.render({
	    elem: '#endDate' //指定元素
	});
</script>
#end